package com.example.interviewrecorder

import android.annotation.SuppressLint
import android.app.Application
import android.content.Context
import com.example.interviewrecorder.manager.LyyAppManager
import com.example.interviewrecorder.manager.LyyExceptionManager
import com.example.interviewrecorder.model.LyyUser

class LyyApplicaiton: Application() {
    companion object{
        @SuppressLint("StaticFieldLeak")
        lateinit var context: Context

        //当前登录的用户
        var currUser: LyyUser?=null
    }
    override fun onCreate() {
        super.onCreate()
        context=applicationContext
        LyyAppManager.registerActivityLifecycleCallbacks(this)
        LyyExceptionManager.init()
    }

    override fun onTerminate() {
        super.onTerminate()
        LyyAppManager.unRegisterActivityLifecycleCallbacks(this)
    }
}